#!/usr/bin/env node
const exp=process.argv[2],
      log=console.log;
if(typeof(exp)==='undefined'||exp==='--help'||exp==='-h'){
  err();
}else{
  calc();
}
function err(){
  log('\ usage: cmd-name [OPTION] [expression]\n\ evaluate the expression.\n\ \n\ Mandatory arguments to long options are mandatory for short options too.\n\ -h, --help output help information and exit');
}
function calc(){
  log(`${exp}=${eval(exp)}`);
}

